<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>

	<head>
		<title>
			贵阳鼎视科技B2B系统
		</title>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	</head>

	<body>
		<script type="text/javascript" src="js/jquery.js">
		</script>
		<script type="text/javascript" src="js/jquery.min.js">
		</script>
		<link type="text/css" rel="stylesheet" href="css/login2.css" />
		<div class="login_header">
			<div class="grid-990 topbar-wrap fn-clear">
				<div>
					<ul style="list-style:none; margin:0px; padding:0px;">
						<li class="toplogo">
						</li>
					</ul>
					<div class="top_company_name">
						贵阳鼎视科技有限公司
					</div>
				</div>
			</div>
		</div>
		<div class="login_line">
		</div>
		<div class="theme">
			<div class="login">
				<div class="ui-form-title">
					<h2>
                        用户登录
                    </h2>
				</div>
				<div class="beforelogin">
					<div class="beforelogin-title">
						用户名：
					</div>
					<div class="beforelogin-title">
						<input onkeydown="if(event.keyCode==13){login();}" id="user_name_tf" maxlength="30" style="width:222px; height:20px;" name="user_name" />
					</div>
					<div class="beforelogin-title">
						<div style="float:left;">
							密码：
						</div>
						<div class="forget-box">
							<label>
                                <a tabindex="-1" target="_self" href="javascript:forgetPassword()">
                                    忘记密码？
                                </a>
                            </label>
						</div>
					</div>
					<div class="beforelogin-title">
						<input onkeydown="if(event.keyCode==13){login();}" type="password" id="user_password_pw" maxlength="30" style="width:222px; height:20px;" name="user_password" prompt="HAP_PASSWORD" />
					</div>
					<div>
						<input class="loginbtn" type="button" value="登录" onclick="javascript:login()" />
					</div>
				</div>
			</div>
		</div>
		<div class="footer">
			<div class="footer-990">
				<p style="float:left;">
					<a class="os_1" href="#">
                        法律声明
                    </a>
					<a class="os_2" target="_black" href="http://www.uniview.com/About_Us/Contact_Us/">
                        联系我们
                    </a>
					<a class="os_3" target="_black" href="http://www.uniview.com">
                        公司官网
                    </a>
				</p>
				<p style="float:right;">
					<b class="os_1">
                        客服热线：400 655 2828
                    </b>
				</p>
			</div>
		</div>
		<script>
			function login() {
				var user_name = eval(document.getElementById('user_name_tf')).value;
				var password = eval(document.getElementById('user_password_pw')).value;
				if (user_name == "") {
					alert("用户名不能为空");
					return;
				};
				if (password == "") {
					alert("密码不能为空");
					return;
				};
				$.post("php/login.php", {
						name: user_name,
						pwd: password
					},
					function(data, status) {
						if (data == 1) {
							window.location.href = 'home.html';
							jQuery.setCookie('user_name', user_name);
						} else {
							alert("用户名或密码不对");
						}
					});
			}

			function showCheckCode() {
				$('#user_name_tf').focus();
				$('#checkCodeDiv').show();
				$('#imageCodeTextField').val('');
				$('#img_code').attr('src', "imagecode?r=" + Math.random());
			}

			function forgetPassword() {
				window.location.href = 'found_password.html';
			}
			$(document).ready(function() {
				$('#user_name_tf').val(jQuery.cookie('user_name'));
				var cc = jQuery.cookie('showCheckCode');
			});
		</script>
	</body>

</html>